﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace GenerateDiagram
{
    /// <summary>
    /// A abstract class instance of table
    /// </summary>
    public abstract class AbstractTable:AbstractBase
    {
        public string Owner { get; set; }
        public string ClassName{ get; set; }
        public bool IsView{ get; set; }
        public bool CanRenderForeignKey { get; set; }
        public List<AbstractColumn> Columns { get; set; }
        public List<ForeignKey>ForeignKeys{ get; set; }
        public RenderOption RenderOption { get; set; }


        /// <summary>
        /// 
        /// </summary>
        /// <param name="nameSpace">Set namespace to render</param>
        /// <param name="version">.Net framework to render</param>
        /// <param name="canRenderForeignKey">Set have render foreign in class diagram</param>
        /// <returns>Return class content of table</returns>
        public abstract string GenerateClass(string nameSpace, Common.Version version, bool canRenderForeignKey);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="databaseName">Database of table to set connection string </param>
        public abstract void SetColumns(string databaseName);
    }
}